/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package olympicgameslogic;


import java.io.Serializable;
import olympicgameslogic.ClassificationType.MEASUREUNIT;

/**
 *
 * @author Nuno
 */
public class ResultDistance extends Result implements Serializable{
   
   private float distance;
   private String u;

   public ResultDistance() {
   }

   public ResultDistance(MEASUREUNIT unit) {
      super(unit);
   }

   public ResultDistance(float distance, String u) {
      this.distance = distance;
      this.u = u;
   }

   public ResultDistance(float distance, String u, MEASUREUNIT unit) {
      super(unit);
      this.distance = distance;
      this.u = u;
   }
    public ResultDistance(float distance, MEASUREUNIT unit) {
      super(unit);
      this.distance = distance;
    
   }

   /**
    * @return the distance
    */
   public float getDistance() {
      return distance;
   }

   /**
    * @return the u
    */
   public String getU() {
      return u;
   }

   /**
    * @param distance the distance to set
    */
   public void setDistance(float distance) {
      this.distance = distance;
   }

   /**
    * @param u the u to set
    */
   public void setU(String u) {
      this.u = u;
   }

   @Override
   public String toString() {
     return (""+this.distance);
   }

   @Override
   public boolean isEqual(Object obj) {
      return (distance == ((ResultDistance)obj).getDistance());
   }
   
   
}
